/*
 * @Description: Have A Nice Day!
 * @Author: Jacky
 * @Date: 2020-02-11 14:34:47
 * @LastEditors  : Jacky
 * @LastEditTime : 2020-02-11 14:55:33
 */
import {createStore, applyMiddleware,compose} from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
import sagas from './sagas'

const sagaMiddleware = createSagaMiddleware()
const middlewares = [sagaMiddleware]

const store = createStore(reducer, applyMiddleware(compose(...middlewares)))
//启动saga
sagaMiddleware.run(sagas)

export default store